$('document').ready(
		function() {
			/*
			 * 生成级联菜单
			 */
			var i = 2015;
			var date = new Date();
			year = date.getFullYear();// 获取当前年份
			var dropList = "<option value='' selected>请选择年份</option>";
			for (i; i < 2050; i++) {
				if (i == year) {
					dropList = dropList + "<option value='" + i + "'>" + i
							+ "</option>";
				} else {
					dropList = dropList + "<option value='" + i + "'>" + i
							+ "</option>";
				}
			}
			$('select[name=year]').html(dropList);// 生成年份下拉菜单
			var monthly = "<option value='' selected>请选择月份</option>";
			for (month = 1; month < 13; month++) {
				monthly = monthly + "<option value='" + month + "'>" + month
						+ "</option>";
			}
			$('select[name=month]').html(monthly);// 生成月份下拉菜单
			var dayly = "<option value='' selected>请选择日期</option>";
			for (day = 1; day <= 31; day++) {
				dayly = dayly + "<option value='" + day + "'>" + day
						+ "</option>";
			}
			$('select[name=day]').html(dayly);// 生成天数下拉菜单
			/*
			 * 处理每个月有多少天---联动
			 */
			$('select[name=month]').change(
					function() {
						var currentDay="<option value=''>请选择日期</option>";
						var Flag = $('select[name=year]').val();
						var currentMonth = $('select[name=month]').val();
						switch (currentMonth) {
						case "1":
						case "3":
						case "5":
						case "7":
						case "8":
						case "10":
						case "12":
							total = 31;
							break;
						case "4":
						case "6":
						case "9":
						case "11":
							total = 30;
							break;
						case "2":
							if ((Flag % 4 == 0 && Flag % 100 != 0)
									|| Flag % 400 == 0) {
								total = 29;
							} else {
								total = 28;
							}

						default:
							break;
						}
						for (day = 1; day <= total; day++) {
							currentDay = currentDay + "<option value='" + day
									+ "'>" + day + "</option>";
						}
						$('select[name=day]').html(currentDay);// 生成日期下拉菜单
					})
					
					
					
		})